home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Telnet / NCSA / tn3270 2.3d26 source / tn3270 / default.kbmap < prev    next >
Text File  |  1991-01-21  |  13KB  |  512 lines

  1. #
  2. #  tn3270 for the Macintosh Source Code
  3. #  Brown University Computing and Information Services
  4. #  Version 2.3d21, January 17, 1991
  5. #  Copyright (c) 1988, 1989, 1990, 1991 by Brown University and by
  6. #  Peter John DiCamillo.
  7. #
  8. #  Permission is granted to any individual or institution to use, copy,
  9. #  or redistribute the binary version of this software and its
  10. #  documentation provided this notice and the copyright notices are
  11. #  retained.  Permission is granted to any individual or non-profit
  12. #  institution to use, copy, modify, or redistribute the source files
  13. #  of this software provided this notice and the copyright notices are
  14. #  retained.  This software may not be distributed for profit, either
  15. #  in original form or in derivative works, nor can the source be
  16. #  distributed to other than an individual or a non-profit institution.
  17. #  Any  individual or group interested in seeing and/or using these
  18. #  source files but who are prevented from doing so by the above
  19. #  constraints should contact Don Wolfe, Assistant Vice-President for
  20. #  Computer Systems at Brown University, (401) 863-7250, for possible
  21. #  software licensing of the source developed at Brown.
  22. #
  23. #  Brown University and Peter John DiCamillo make no representations
  24. #  about the suitability of this software for any purpose.
  25. #
  26. #  BROWN UNIVERSITY AND PETER JOHN DICAMILLO GIVE NO WARRANTY, EITHER
  27. #  EXPRESS OR IMPLIED, FOR THE PROGRAM AND/OR DOCUMENTATION PROVIDED,
  28. #  INCLUDING, WITHOUT LIMITATION, WARRANTY OF MERCHANTABILITY AND
  29. #  WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
  30. #
  31.  
  32. #
  33. # tn3270 keycode mapping definition
  34. #
  35. # General syntax rules:
  36. #    Case is ignored except in the name of the key mapping, and in character
  37. #    literals, e.g. 'a'.
  38. #
  39. #    Blank lines, white space, and any text following "#" on a line is ignored.
  40. #
  41. # The three types of definition lines are the mapping name definition, the
  42. # mapping number definition, and the key mapping definition:
  43. #
  44. #    To name this mapping:
  45. #        name: {mapping name}
  46. #    Underscores in the name are replaced by blanks.  Use two consecutive
  47. #    underscores to include an underscore in the name.
  48. #
  49. #    To assign a resource number for this mapping:
  50. #        number: {resource number}
  51. #    This number is only used when the resource is written out in "Rez"
  52. #    file format.
  53. #
  54. #    To map a function to a key sequence:
  55. #         function = [modifier] {'literal' | "hexcode" | "Khexcode"}
  56. #
  57. #    Function names are listed below.  Following each name enclosed in
  58. #    parenthesis is the EBCDIC hex code the name maps to.
  59. #      Punctuation Marks:
  60. #        space (40)        cent (4A)        period (4B)            less (4C)
  61. #        lparen (4D)        plus (4E)        or (4F)                ampersand (50)
  62. #        exclaim (5A)    dollar (5B)        asterisk (5C)        rparen (5D)
  63. #        semi (5E)        not (5F)        minus (60)            slash (61)
  64. #        vertical (6A)    comma (6B)        percent (6C)        underscore (6D)
  65. #        greater (6E)    question (6F)    accent (79)            colon (7A)
  66. #        pound (7B)        at (7C)            apostrophe (7D)        equal (7E)
  67. #        dblquote (7F)    tilde (A1)        lbrack (AD)            rbrack (BD)
  68. #        lbrace (C0)        rbrace (D0)
  69. #      Lowercase Letters:
  70. #        lca through lci (81 through 89)
  71. #        lcj through lcr (91 through 99)
  72. #        lcs through lcz (A2 through A9)
  73. #      Uppercase Letters:
  74. #        a through i    (C1 through C9)
  75. #        j through r (D1 through D9)
  76. #        s through z (E2 through E9)
  77. #      Digits:
  78. #        0 through 9 (F0 through F9)
  79. #      APL Characters: (hex codes given are preceded by Graphics Escape)
  80. #        Note: APL mode must be in effect for these characters to be generated.
  81. #        a_ through i_ (41 through 49) (underscored uppercase letters)
  82. #        j_ through r_ (51 through 59)
  83. #        s_ through z_ (62 through 69)
  84. #        i-beam (DA)            del-tilde (FB)        grade-down (DC)
  85. #        grade-up (DD)        vert-rotate (CD)    transpose (CF)
  86. #        hor-rotate (ED)        logarithm (FD)        nor (CB)
  87. #        nand (CA)            apl-exclaim (DB)    domino (EE)
  88. #        quote-quad (DE)        delta_ (FC)            format (FE)
  89. #        execute (EF)        lamp (DF)            expand (EB)
  90. #        compress (EA)
  91. #      ALA Characters (for use the built-in ALA font)
  92. #        left_tack (2A)        pointer (38)        paragraph (39)
  93. #        single_dagger (3A)    double_dagger(3B)    polish_l (41)
  94. #        slash_o (42)        d_crossed (43)        thorn (44)
  95. #        ae (45)                oe (46)                hook_o (47)
  96. #        hook_u (48)            maigkiy_znak (49)    lcpolish_l (51)
  97. #        lcslash_o (52)        lcd_crossed (53)    lcthorn (54)
  98. #        lcae (55)            lcoe (56)            lchook_o (57)
  99. #        lchook_u (58)        tverdyi_znak (59)    ayn (62)
  100. #        alf (63)            middle_dot (64)        turkish_i (65)
  101. #        flat (66)            patent (67)            eth (68)
  102. #        plus_or_minus (69)    sub0 (70) through sub8 (78)
  103. #        script_l (80)        angstrom (8A)        superior_dot (8B)
  104. #        umlaut (8C)            candrabindu (8D)    left_ligature (8E)
  105. #        left_d_tilde (8F)    sub9 (90)            grave (9A)
  106. #        acute (9B)            ala_circumflex (9C)    hacek (9D)
  107. #        right_ligature (9E)    right_d_tilde (9F)    ala_dagger(A0)
  108. #        sub_plus (AA)        sub_lparen (AB)        pincushion (AC)
  109. #        sub_minus (AE)        sub_rparen (AF)
  110. #        sup0 (B0) through sup9 (B9)                sup_plus (BA)
  111. #        sup_lparen (BB)        asper (BC)            sup_minus (BE)
  112. #        sup_rparen (BF)        circle_below (CA)    dot_below (CB)
  113. #        double_dot_below (CC)  breve (CD)        ala_tilde (CE)
  114. #        pseudo_quest (CF)    cedilla (DA)        high_comma_ctr (DB)
  115. #        right_hook (DC)        upadhmaniya (DD)    macron (DE)
  116. #        double_acute (DF)    british_pound (E2)    right_cedilla (EA)
  117. #        high_comma (EB)        left_hook (EC)        ala_underscore (ED)
  118. #        double_underscore (EE)  ala_alpha (FA)    ala_beta (FB)
  119. #        ala_gamma (FC)        yen (FD)            peso (FE)
  120. #      Attention Keys: (hex codes are the AID codes transmitted)
  121. #        pf1 through pf9 (F1 through F9)
  122. #        pf10 through pf12 (7A through 7C)
  123. #        pf13 through pf21 (C1 through C9)
  124. #        pf22 through pf24 (4A through 4C)
  125. #        enter (7D)        pa1 (6C)        pa2 (6E)        pa3 (6B)
  126. #        clear (6D)        treq (F0)        cursel (7E)
  127. #      Cursor Movement:
  128. #        up                down            left        right        tab
  129. #        backtab            newline            home        up*2        down*2
  130. #        left*2            right*2
  131. #      Editing:
  132. #        erase-eof        erase-input        delete-char        insert-char
  133. #        dup                field-mark        rub-out
  134. #      Program Control:
  135. #        insert-mode (toggle insert mode)
  136. #        apl-mode (toggle keyboard APL mode)
  137. #        cursor-pos (toggle cursor position display)
  138. #        reset (unlock keyboard)
  139. #        prog-reset (reset program; resets above modes and I/O)
  140. #
  141. #    Modifier is: normal, shift, command, command-shift, or option.  
  142. #   If the user presses more than one modifier key, the precedence of the
  143. #    modifiers is: command-shift, command, option, and shift.  It is not
  144. #    possible to specify mapping for other combinations, such as command-option.
  145. #    For ASCII key mappings, when "modifier" is omitted, the mapping applies
  146. #    to both "normal" and "shift".  For keycode mappings, the default modifier
  147. #    is "normal", i.e. no modifiers.
  148. #
  149. #    'literal' specifies a mapping to the ASCII code defined by the character
  150. #    literal.
  151. #
  152. #    "hexcode" specifies a mapping to the ASCII code given in hex.  It must
  153. #    consist of exactly two hex digits.
  154. #
  155. #    "Khexcode" specifies a keycode mapping to the code given in hex.  It must
  156. #    consist of exactly two hex digits.
  157. #    If a keycode mapping is defined for a key, it takes precedence over an
  158. #    ASCII code mapping for it.
  159. #    Keycode mapping use the raw key codes provided by the Macintosh operating
  160. #    system for a key press event.  They are hardware dependent, and should only
  161. #    be used when keys which must be distinguished return the same ASCII codes.
  162. #    For keycode values see "The Toolbox Event Manager" chapter in volumes 1 and
  163. #    5 of "Inside Macintosh".
  164. #
  165. # tn3270 default mapping:
  166. #
  167. name: default
  168. number: 128
  169.  
  170. # charcter mappings
  171.  
  172. space = "20"        # spaces are ignored in literals too
  173. cent = option "d2"    # option [
  174. period = '.'
  175. less = '<'
  176. lparen = '('
  177. plus = '+'
  178. or = '|'
  179. ampersand = '&'
  180. exclaim = '!'
  181. dollar = '$'
  182. asterisk = '*'
  183. rparen = ')'
  184. semi = ';'
  185. not = '^'
  186. minus = '-'
  187. slash = '/'
  188. vertical = option '`'
  189. comma = ','
  190. percent = '%'
  191. underscore = '_'
  192. greater = '>'
  193. question = '?'
  194. accent = '`'
  195. colon = ':'
  196. pound = "23"    # can't use comment delimiter in a literal!
  197. at = '@'
  198. apostrophe = '''
  199. equal = '='
  200. dblquote = '"'
  201. lca = 'a'
  202. lcb = 'b'
  203. lcc = 'c'
  204. lcd = 'd'
  205. lce = 'e'
  206. lcf = 'f'
  207. lcg = 'g'
  208. lch = 'h'
  209. lci = 'i'
  210. lcj = 'j'
  211. lck = 'k'
  212. lcl = 'l'
  213. lcm = 'm'
  214. lcn = 'n'
  215. lco = 'o'
  216. lcp = 'p'
  217. lcq = 'q'
  218. lcr = 'r'
  219. lcs = 's'
  220. lct = 't'
  221. lcu = 'u'
  222. lcv = 'v'
  223. lcw = 'w'
  224. lcx = 'x'
  225. lcy = 'y'
  226. lcz = 'z'
  227. tilde = '~'
  228. lbrack = '['
  229. rbrack = ']'
  230. lbrace = '{'
  231. rbrace = '}'
  232. a = 'A'
  233. b = 'B'
  234. c = 'C'
  235. d = 'D'
  236. e = 'E'
  237. f = 'F'
  238. g = 'G'
  239. h = 'H'
  240. i = 'I'
  241. j = 'J'
  242. k = 'K'
  243. l = 'L'
  244. m = 'M'
  245. n = 'N'
  246. o = 'O'
  247. p = 'P'
  248. q = 'Q'
  249. r = 'R'
  250. s = 'S'
  251. t = 'T'
  252. u = 'U'
  253. v = 'V'
  254. w = 'W'
  255. x = 'X'
  256. y = 'Y'
  257. z = 'Z'
  258. backslash = '\'
  259. 0 = '0'
  260. 1 = '1'
  261. 2 = '2'
  262. 3 = '3'
  263. 4 = '4'
  264. 5 = '5'
  265. 6 = '6'
  266. 7 = '7'
  267. 8 = '8'
  268. 9 = '9'
  269. a_ = option "K00"
  270. b_ = option "K0b"
  271. c_ = option "K08"
  272. d_ = option "K02"
  273. e_ = option "K0e"
  274. f_ = option "K03"
  275. g_ = option "K05"
  276. h_ = option "K04"
  277. i_ = option "K22"
  278. j_ = option "K26"
  279. k_ = option "K28"
  280. l_ = option "K25"
  281. m_ = option "K2e"
  282. n_ = option "K2d"
  283. o_ = option "K1f"
  284. p_ = option "K23"
  285. q_ = option "K0c"
  286. r_ = option "K0f"
  287. s_ = option "K01"
  288. t_ = option "K11"
  289. u_ = option "K20"
  290. v_ = option "K09"
  291. w_ = option "K0d"
  292. x_ = option "K07"
  293. y_ = option "K10"
  294. z_ = option "K06"
  295. i-beam = option "K12"
  296. del-tilde = option "K13"
  297. grade-down = option "K14"
  298. grade-up = option "K15"
  299. vert-rotate = option "K17"
  300. transpose = option "K16"
  301. hor-rotate = option "K1a"
  302. logarithm = option "K1c"
  303. nor = option "K19"
  304. nand = option "K1d"
  305. apl-exclaim = option "K1b"
  306. domino = option "K18"
  307. quote-quad = option "K1e"
  308. delta_ = option "K2a"
  309. format = option "K29"
  310. execute = option "K27"
  311. lamp = option "K2b"
  312. expand = option "K2f"
  313. compress = option "K2c"
  314.  
  315. # function mappings
  316.  
  317. enter = normal "0d"
  318.  
  319. pf1 = command '1'
  320. pf1 = "K53"        # keypad 1
  321. pf1 = "K7a"        # F1
  322. pf1 = "K72"        # help
  323.  
  324. pf2 = command '2'
  325. pf2 = "K54"        # keypad 2
  326. pf2 = "K78"        # F2
  327.  
  328. pf3 = command '3'
  329. pf3 = "K55"        # keypad 3
  330. pf3 = "K63"        # F3
  331. pf3 = "K77"        # end
  332.  
  333. pf4 = command '4'
  334. pf4 = "K56"        # keypad 4
  335. pf4 = "K76"        # F4
  336.  
  337. pf5 = command '5'
  338. pf5 = "K57"        # keypad 5
  339. pf5 = "K60"        # F5
  340.  
  341. pf6 = command '6'
  342. pf6 = "K58"        # keypad 6
  343. pf6 = "K61"        # F6
  344.  
  345. pf7 = command '7'
  346. pf7 = "K59"        # keypad 7
  347. pf7 = "K62"        # F7
  348. pf7 = "K74"        # page up
  349.  
  350. pf8 = command '8'
  351. pf8 = "K5b"        # keypad 8
  352. pf8 = "K64"        # F8
  353. pf8 = "K79"        # page down
  354.  
  355. pf9 = command '9'
  356. pf9 = "K5c"        # keypad 9
  357. pf9 = "K65"        # F9
  358.  
  359. pf10 = command '0'
  360. pf10 = "K52"    # keypad 0
  361. pf10 = "K6d"    # F10
  362.  
  363. pf11 = command '-'
  364. pf11 = "K41"    # keypad .
  365. pf11 = "K67"    # F11
  366.  
  367. pf12 = command '='
  368. pf12 = "K4c"    # keypad enter
  369. pf12 = "K6f"    # F12
  370.  
  371. pf13 = command-shift '1'
  372. pf13 = shift "K53"    # keypad 1
  373. pf13 = "K69"        # F13
  374. pf13 = shift "K7a"    # F1
  375.  
  376. pf14 = command-shift '2'
  377. pf14 = shift "K54"    # keypad 2
  378. pf14 = "K6b"        # F14
  379. pf14 = shift "K78"    # F2
  380.  
  381. pf15 = command-shift '3'
  382. pf15 = shift "K55"    # keypad 3
  383. pf15 = "K71"        # F15
  384. pf15 = shift "K63"    # F3
  385.  
  386. pf16 = command-shift '4'
  387. pf16 = shift "K56"    # keypad 4
  388. pf16 = shift "K76"    # F4
  389.  
  390. pf17 = command-shift '5'
  391. pf17 = shift "K57"    # keypad 5
  392. pf17 = shift "K60"    # F5
  393.  
  394. pf18 = command-shift '6'
  395. pf18 = shift "K58"    # keypad 6
  396. pf18 = shift "K61"    # F6
  397.  
  398. pf19 = command-shift '7'
  399. pf19 = shift "K59"    # keypad 7
  400. pf19 = shift "K62"    # F7
  401.  
  402. pf20 = command-shift '8'
  403. pf20 = shift "K5b"    # keypad 8
  404. pf20 = shift "K64"    # F8
  405.  
  406. pf21 = command-shift '9'
  407. pf21 = shift "K5c"    # keypad 9
  408. pf21 = shift "K65"    # F9
  409.  
  410. pf22 = command-shift '0'
  411. pf22 = shift "K52"    # keypad 0
  412. pf22 = shift "K6d"    # F10
  413.  
  414. pf23 = command-shift '-'
  415. pf23 = shift "K41"    # keypad .
  416. pf23 = shift "K67"    # F11
  417.  
  418. pf24 = command-shift '='
  419. pf24 = shift "K4c"    # keypad enter
  420. pf24 = shift "K6f"    # F12
  421.  
  422. pa1 = command ','
  423. pa1 = "K51"            # keypad = (ADB keypad)
  424. pa1 = shift "K48"    # keypad , (numeric/Plus keypad)
  425.  
  426. pa2 = command '.'
  427. pa2 = "K4b"            # keypad / (ADB keypad)
  428. pa2 = shift "K4d"    # keypad / (numeric/Plus keypad)
  429.  
  430. pa3 = command '\'
  431. pa3 = command "03"    # enter
  432.  
  433. clear = command 'c'
  434. clear = "1b"        # keypad clear
  435.  
  436. treq = command '/'
  437. treq = "K43"        # keypad * (ADB keypad)
  438. treq = shift "K42"    # keypad * (numeric/Plus keypad)
  439.  
  440. cursel = command 'l'
  441.  
  442. up = command 'u'
  443. up = "1e"            # up arrow code
  444.  
  445. down = command 'm'
  446. down = command 'n'
  447. down = "1f"            # down arrow code
  448.  
  449. left = command 'h'
  450. left = "1c"            # left arrow code
  451. left = normal "08"    # backspace/delete code
  452.  
  453.  
  454. right = command 'j'
  455. right = command 'k'
  456. right = "1d"        # right arrow code
  457.  
  458. tab = normal "09"    # tab key
  459. backtab = shift "09"
  460.  
  461. newline = "03"            # enter key
  462. newline = shift "0d"    # return key
  463.  
  464. home = command "0d"        # return key
  465. home = "K73"            # home key
  466.  
  467. erase-eof = command 'e'
  468. erase-eof = "K4e"        # keypad -
  469.  
  470. erase-input = command-shift 'e'
  471. erase-input = shift "K4e"    # keypad -
  472.  
  473. insert-mode = command 'i'
  474. insert-mode = "K45"            # keypad + (ADB keypad)
  475. insert-mode = shift "K46"    # keypad + (numeric/Plus keypad)
  476.  
  477. delete-char = shift "08"    # backspace/delete key
  478. delete-char = "K75"            # X (Del) key
  479.  
  480. reset = command 'r'
  481.  
  482. dup = command 'd'
  483.  
  484. field-mark = command 'f'
  485.  
  486. apl-mode = command 'a'
  487.  
  488. insert-char = option "08"    # backspace/delete key
  489.  
  490. rub-out = command "08"        # backspace/delete key
  491.  
  492. up*2 = command-shift 'u'
  493. up*2 = option "1e"            # up arrow code
  494.  
  495. down*2 = command-shift 'm'
  496. down*2 = command-shift 'n'
  497. down*2 = option "1f"        # down arrow code
  498.  
  499. left*2 = command-shift 'h'
  500. left*2 = option "1c"        # left arrow code
  501.  
  502. right*2 = command-shift 'j'
  503. right*2 = command-shift 'k'
  504. right*2 = option "1d"        # right arrow code
  505.  
  506. cursor-pos = command 'p'
  507.  
  508. prog-reset = command 'g'
  509.  
  510.  
  511.  
  512.